import type { Component } from 'vue';

export interface Tool {
  /**
   * 工具名称
   */
  name: string
  /**
   * 工具路由路径
   */
  path: string
  description: string
  keywords: string[]
  component: () => Promise<Component>
  icon: Component
  redirectFrom?: string[]
  /**
   * 是否是新的工具
   */
  isNew: boolean
  /**
   * 创建时间
   */
  createdAt?: Date
}

export interface ToolCategory {
  name: string
  components: Tool[]
}

export type ToolWithCategory = Tool & { category: string };
